Skip to content

Reject ISMNs (979-0) as ISBN-13s [patch] - #459

Merged
matt-edmondson merged 1 commit into
mainfrom
fix/455-isbn-reject-ismn
Oct 18, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
fix/455-isbn-reject-ismn

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #455

Summary

  • IsIsbnAttribute.IsValidIsbn13 now rejects values starting with 9790. That prefix is the International Standard Music Number (ISMN) range for printed music, not an ISBN range. An ISMN has a valid EAN-13 check digit, so before this change it passed as an Isbn on its 979 prefix alone.
  • 978 and the other 979 prefixes (979-1x, 979-8) still validate.
  • The XML docs on Isbn and IsIsbnAttribute, and the rules table in the Semantics.Strings.Identifiers README, now mention the exclusion.

Tests

  • Create_Ismn_Throws / TryCreate_Ismn_ReturnsFalse: 979-0-2600-0043-8 and 9790060115615 are rejected.
  • The existing Create_ValidIsbn13With979Prefix_Succeeds still passes, so 979-10-90636-07-1 still validates.
  • With the validator change reverted, all four new cases fail. With it in place, the full Semantics.Test suite passes on net10.0 (1695 passed, 8 skipped).

Generated by Claude Code

979-0 is the International Standard Music Number range for printed
music, not an ISBN range, and an ISMN carries a valid EAN-13 check
digit, so it passed as an Isbn on its 979 prefix alone.

Fixes #455

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BT7W7buDP2wr6DWYZ2xKeQ
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit 5db9b79 into main Oct 18, 2026
16 checks passed
@matt-edmondson
matt-edmondson deleted the fix/455-isbn-reject-ismn branch October 18, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Isbn accepts ISMNs (printed-music numbers, prefix 979-0) as valid book numbers

1 participant